package com.hxh.common;

import com.hxh.common.unification.ResultOutcome;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author: hxh
 * @Date: 2023/3/3
 */
@RestControllerAdvice
public class GlobalException {
    @ExceptionHandler(value = RuntimeException.class)
    public ResultOutcome handle(RuntimeException e) {
        e.getMessage();
        return ResultOutcome.fileResult(e.getMessage());
    }
}
